<template>
  <div class="model-test">
    <div>
      model<br>
      <model v-model="flag"></model>
      <button @click="flag = true">show</button>
    </div>
    <div>
      model in model: {{city}}
      <modelInModel v-model="city"></modelInModel>
    </div>
  </div>
</template>

<script>
  import model from './components/Model'
  import modelInModel from './components/ModelInModel'
  export default {
    name: "modelTest",
    components: {
      model,
      modelInModel
    },
    data() {
      return {
        flag: true,
        city: '',
      }
    },
    watch: {
      flag(val, newval) {
        console.log(val, newval);
      }
    },
    methods: {
      show() {
        this.flag = true;
      }
    }
  }
</script>

<style scoped>

</style>
